# 添加编译选项: BUILD_MODULE_TYPE, 可在 setup.py 中设置
if(NOT BUILD_MODULE_TYPE STREQUAL "PYTHON")
    return()
endif()

# 查找 pybind11
find_package(pybind11 REQUIRED)
if (NOT pybind11_FOUND)
    find_package(pybind11 CONFIG)
    if (NOT pybind11_FOUND)
        message(FATAL_ERROR "Found pybind11: False")
    else()
        message(STATUS "Found pybind11: ${pybind11_DIR}")
    endif()
else()
    message(STATUS "Found pybind11: ${pybind11_DIR}")
endif()

if (BUILD_WITH_NPU)
    add_subdirectory(txda)
    list(APPEND PY_CPP_OBJS $<TARGET_OBJECTS:PY_NPU_OBJ>)
endif()